<div class="section">
     <?if(Yii::app()->user->hasFlash('opersuc')):?>
    <div class="messages green" onclick="$(this).fadeOut();" style="cursor:pointer;float:left;clear: both;padding-right: 10px;"><span></span><?=Yii::app()->user->getFlash('opersuc');?> </div>
    <?endif?>
		<div class="box">
			<div class="title">
				<h2><?=Yii::t('app','Редактирование новости')?></h2>
				<span class="hide"></span>
			</div>
<div class="content forms">

    <?$form=$this->beginWidget('CActiveForm', array(
        'id'=>'addnews-form',
        'enableAjaxValidation'=>true,
    )); ?>

    <?=$form->errorSummary($news); ?>

				
					<div class="line" style="border-top-width: 2px; border-top-style: solid; border-top-color: rgb(242, 244, 247); border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(242, 244, 247); ">
						<?=$form->label($news,'title'); ?>
                        <?=CHtml::activeTextField($news,'title',array('class'=>'xl')); ?>
					</div>

                      <div class="line">
                      <?=$form->label($news,'publiced_date'); ?>
                      <?if(strtotime($news->publiced_date)!=null){?>
                           <?=CHtml::activeTextField($news,'publiced_date',array('class'=>'datepicker','value'=>date('d.m.Y',strtotime($news->publiced_date)))); ?>
                      <?} else {?>
                           <?=CHtml::activeTextField($news,'publiced_date',array('class'=>'datepicker','value'=>date('d.m.Y'))); ?>
                      <?}?>
                                        </div>
                    <div class="line">
                       <?=$form->label($news,'is_active'); ?>
                       <input type="checkbox" name="is_active" id="check-1" <?if($news->is_active == 1) echo 'checked';?> />
                       <label for="check-1">Опубликовано</label>

                                        </div>

					
					<div class="line" style="border-top-width: 2px; border-top-style: solid; border-top-color: rgb(242, 244, 247); border-bottom-style: none; border-bottom-width: initial; border-bottom-color: initial; ">
				        <?=$form->label($news,'content_short'); ?>
                        <?=CHtml::activeTextArea($news,'content_short',array('class'=>'xl')); ?>
					</div>

                    <div class="line">
                        <?=$form->label($news,'content'); ?>
                        <?=CHtml::activeTextArea($news,'content',array('class'=>'wysiwyg')); ?>
                    </div>

                    <div class="line button">
                                          
                                            <button type="submit" class="green medium"><span><?=Yii::t('app','Сохранить');?></span></button>
                                            <button type="submit" onclick="window.location.replace('<?=$this->createUrl("news/")?>');return false; " class="blue medium"><span>Отмена</span></button>
                                            
                                        </div>

    <?$this->endWidget(); ?>

			</div>
		</div>
	